<!DOCTYPE HTML>
<html>
<head>
<title>IsObject() | AutoHotkey</title>
<meta name="description" content="The IsObject function returns a non-zero number if the specified value is an object." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
<script type="text/javascript">$(function(){0<=window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")&&CaoNiMaDeUc()})</script>
</head>
<body>

<h1>IsObject(ObjectValue) <span class="ver">[v1.0.90+]</span></h1>

<p>当 ObjectValue 是对象时返回非零数字.</p>

<pre class="Syntax">TrueOrFalse := <span class="func">IsObject</span>(ObjectValue)</pre>
<h2>参数</h2>
<dl>

  <dt>ObjectValue</dt>
  <dd><p>可以是储存在变量的, 也可以是函数返回的, 存储在另一个对象中的或直接写入的<a href="../Objects.htm">对象</a>.<br>(注1: 就是任何表示对象的变量.)<br>(注2: 空对象也是对象, 例如: isObject({}) 将返回 1).</p></dd>

</dl>

<h2>返回值</h2>
<p>当 <em>ObjectValue</em> 为对象时返回 1, 否则返回 0.</p>

<h2>相关</h2>
<p><a href="../Objects.htm">对象</a></p>
<h2>示例</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>object := {key: "value"}

if IsObject(object)
    MsgBox, 是对象.
else
    MsgBox, 不是对象.</pre>
</div>

</body>
</html>